<script>
import Vue from 'vue';
export default {
	//简单全局变量  =>getApp().globalData.text = 'test'
	globalData: {
		// text: 'text'
		flag: false
	},
	onLaunch: function() {
		console.log('平台', this.$u.os());
		// 获取系统状态栏的高度
		// const token = uni.getStorageSync('token');
		// console.log('token', token);
		// if (token) {
		// 	uni.switchTab({
		// 		url: '/pages/home/index'
		// 	});
		// }
		let systemInfo = uni.getSystemInfoSync();
		Vue.prototype.systemInfo = systemInfo; //获取頂部状态栏信息
		Vue.prototype.phoneWidth = systemInfo.windowWidth; //手机宽度
		Vue.prototype.barHeight = systemInfo.statusBarHeight; //系统顶部状态栏高度
		// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
		let menuButtonInfo = uni.getMenuButtonBoundingClientRect(); //获取非支付宝小程序 胶囊信息
		Vue.prototype.capsuleInfo = menuButtonInfo;
		Vue.prototype.capsuleHeight = systemInfo.platform == 'ios' ? 44 : 48; //获取非支付宝小程序 胶囊高度
		// #endif
	},
	onShow: function() {
		console.log('App Show');
	},
	onHide: function() {
		console.log('App Hide');
	}
};
</script>

<style lang="scss">
@import 'uview-ui/index.scss';
/*每个页面公共css */

page {
	background-color: #f7f7f8;
	@include anim(fade) {
		opacity: 0;
	}

	@include anim(slide-top) {
		opacity: 0;
		transform: translateY(-21px);
	}

	@include anim(slide-bottom) {
		opacity: 0;
		transform: translateY(19px);
	}

	@include anim(slide-right) {
		opacity: 0;
		transform: translateX(19px);
	}

	@include anim(slide-left) {
		opacity: 0;
		transform: translateX(-21px);
	}

	@include anim(zoom) {
		opacity: 0.3;
		transform: scale(0.5);
	}
}

@font-face {
	font-family: iconfont;
	font-weight: normal;
	font-style: normal;
	src: url('http://at.alicdn.com/t/font_2300527_v5ll8vl76c.ttf') format('truetype');
}

.iconfont {
	font-family: 'iconfont' !important;
	font-size: 32rpx;
	font-style: normal;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.icon-bankcard:before {
	content: '\e626';
}
.icon-wallet:before {
	content: '\e627';
}
.icon-withdraw:before {
	content: '\e628';
}
.icon-fans:before {
	content: '\e699';
}
.icon-crown:before {
	content: '\e69b';
}
.icon-dun:before {
	content: '\e6a7';
}
.icon-phone:before {
	content: '\e6a6';
}
.icon-qiandai:before {
	content: '\e6ad';
}
.icon-fire:before {
	content: '\e6ae';
}
.icon-link:before {
	content: '\e6af';
}
.icon-shop:before {
	content: '\e6b0';
}
.icon-copy:before {
	content: '\e6b1';
}
.icon-screen:before {
	content: '\e6b2';
}
.icon-smile:before {
	content: '\e6b3';
}
.icon-arrows:before {
	content: '\e884';
}
.icon-zan:before {
	content: '\e885';
}
.icon-msg:before {
	content: '\e886';
}
.icon-share:before {
	content: '\e887';
}
</style>
